// 四表-集中器
package models

type DeviceInfo_Concentrator struct {
	ID                           int64                          `gorm:"not null;column:ID; PRIMARY_KEY"`
	Device_ID                    int64                          `gorm:"not null;column:Device_ID"` //deviceinfo表id
	Name                         string                         `gorm:"not null;column:Name"`
	Describe                     *string                        `gorm:"column:Describe"`
	Dev                          string                         `gorm:"not null;column:Dev"` //集中器地址码
	DeviceInfo_Concentrator_User []DeviceInfo_Concentrator_User `gorm:"foreignKey:DeviceInfo_Concentrator_ID;references:ID;constraint:OnDelete:CASCADE"`
}

// 配置数据库操作的表名称
func (DeviceInfo_Concentrator) TableName() string {
	return "DeviceInfo_Concentrator"
}

type EditDeviceInfo_ConcentratorRequest struct {
	DeviceInfo_Concentrator DeviceInfo_Concentrator `json:"DeviceInfo_Concentrator"`
}
